package com.jh.paymentchannel.msdf.common;

import com.jh.paymentchannel.msdf.util.JsonUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import java.io.Serializable;

/**
 * ClassName: AbstractData
 * 
 * @description
 * @author framework
 * @Date 2013-4-1
 */
public abstract class AbstractData implements IData, Serializable {
    private static final long serialVersionUID = -5370753736394832569L;

    private Log log = LogFactory.getLog(AbstractData.class);

    /**
     * 
     */
    public String toString() {
        if (log.isDebugEnabled()) {
            return JsonUtils.toJson(this);
        }
        return super.toString();
    }
}
